#include<bits/stdc++.h>
#define int long long
#define double long double
using namespace std;
const int N = 1e6+5;
int n,k;
struct node{
	int x,y;
	inline friend bool operator < (node x,node y)
	{
		return x.x*y.y<x.y*y.x;
	}
}a[N];
namespace sub1{
	double b[N];
	inline void main()
	{
		sort(a+1,a+n+1),reverse(a+1,a+n+1);
		double ans = -1;
		for(int z = 1;z<(1<<n);z++)
		{
			if(__builtin_popcount(z)!=k) continue;
			int cnt = 0;
			for(int i = 1;i<=n;i++)
				if((z>>i-1)&1) b[++cnt] = (double)a[i].x/a[i].y;
			double now = 0;
			for(int i = 1;i<=k+1;i++)
			{
				double w = 1;
				for(int j = 1;j<i;j++) w*=b[j];
				for(int j = i;j<=k;j++) w*=(1.0-b[j]);
				now+=w;
			}
			ans = max(ans,now);
		}
		cout<<1.0-ans;
	}
}
namespace sub2{
	double s[N];
	node b[N];
	inline void main()
	{
		sort(a+1,a+n+1);
		int cnt = 0;
		for(int i = 1;i<=k/2;i++) b[++cnt] = a[i];
		reverse(a+1,a+n+1);
		for(int i = 1;i<=k-k/2;i++) b[++cnt] = a[i];
		sort(b+1,b+k+1),reverse(b+1,b+k+1);
		s[0] = 1;
		for(int i = 1;i<=k;i++)
			s[i] = s[i-1]*b[i].x/b[i].y;
		double ans = 0,now = 1;
		for(int i = k;i;i--)
		{
			ans+=now*s[i];
			now = now*((double)1-(double)b[i].x/b[i].y);
		}
		ans+=now;
		cout<<(double)1-ans;
	}
}
signed main()
{
	freopen("sleep.in","r",stdin);
	freopen("sleep.out","w",stdout);
	ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
	cout<<fixed<<setprecision(10);
	cin>>n>>k;
	for(int i = 1;i<=n;i++) cin>>a[i].x>>a[i].y;
	if(n<=20) sub1::main();
	else sub2::main();
	return 0;
}

